Fix Exchangable misspelling: add Exchangeable* components, deprecate misspelt forms#1041
Fix Exchangable misspelling: add Exchangeable* components, deprecate misspelt forms#1041atibaut wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a long-standing misspelling of Exchangable* schema component names in the fares model by introducing correctly spelled Exchangeable* alternatives while retaining the misspelt forms as deprecated aliases to preserve backward compatibility.
Changes:
- Adds new
Exchangeable*elements/types alongside existingExchangable*definitions and marks the misspelt forms as deprecated (-v2.1). - Introduces
ExchangeableToEnumerationand an aliasExchangableToEnumerationthat restricts the new type. - Updates
NameOfClassenumeration to include the new correctly spelled values while keeping the old ones.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| xsd/netex_part_3/part3_fares/netex_usageParameterAfterSales_version.xsd | Adds correctly spelled Exchangeable* elements and deprecates misspelt Exchangable* forms in reselling/exchanging groups. |
| xsd/netex_part_3/part3_fares/netex_usageParameterAfterSales_support.xsd | Adds ExchangeableToEnumeration and keeps ExchangableToEnumeration as a deprecated alias type. |
| xsd/netex_part_3/part3_fares/netex_fareConditionSummary_version.xsd | Adds IsExchangeable and deprecates IsExchangable. |
| xsd/netex_framework/netex_responsibility/netex_entity_support.xsd | Extends NameOfClass enumeration with the new Exchangeable* / IsExchangeable values while retaining legacy spellings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ings appearing simultaneously
…e names are not visible in instance documents)
|
@skinkie, re-targeted from Core ideas:
|
|
@atibaut |
@atibaut, I launched it in PR #1045. We will need to clarify the process but it is usually the person who merges the PR that has to do it. 😊 |
Fixes the long-standing "Exchangable" misspelling in the fares model without breaking existing documents.
Two different treatments, depending on visibility:
ExchangableToEnumeration→ExchangeableToEnumeration. No alias is kept — only schema-internal references and generated bindings see type names.NameOfClassvalues (visible in instance documents) get correctly spelt forms added alongside, with the misspelt forms kept as deprecated aliases for removal at a later major version, following the deprecation pattern already used in the schema (e.g.DEPRECATED - use privateCodes. -v2.0). New components are marked+v2.1, deprecations-v2.1.Related: the misspelling was noted in the "Deliberately left out" section of #1039.
Changes
netex_usageParameterAfterSales_support.xsdExchangableToEnumerationrenamed toExchangeableToEnumeration(same 11 values).netex_usageParameterAfterSales_version.xsdResellingPeriodGroup: correctly spelt alternatives added for all seven elements —ExchangeableFromAnyTime/ExchangeableFromDuration/ExchangeableFromPercentUse,ExchangeableFromIntervalRef,ExchangeableUntilAnyTime/ExchangeableUntilDuration/ExchangeableUntilPercentUse,ExchangeableUntilIntervalRef. The new spellings were added to the existingxsd:choicegroups; the two standalone…IntervalRefelements became two-member choices (old name | new name), so a document can use either spelling but not both.ExchangingConditionsGroup: newExchangeableToelement;ExchangableTodeprecated (now typed with the renamed enumeration,default="anyProduct"retained). Both are wrapped in anxsd:choiceso the two spellings cannot appear simultaneously.netex_fareConditionSummary_version.xsdConditionSummaryCommercialGroup: newIsExchangeableelement;IsExchangabledeprecated but unchanged otherwise. Both wrapped in anxsd:choice.netex_framework/netex_responsibility/netex_entity_support.xsdNameOfClassenumeration: the nineExchangeable*names andIsExchangeableadded in alphabetical position; misspelt values retained for backwards compatibility and annotatedDEPRECATED - misspelt, use … instead. -v2.1(same style as the deprecated mode values innetex_mode_support.xsd).All four files have a
<Modified>changelog entry added.Backwards compatibility
NameOfClassvalues remain valid — no existing document breaks. The choice-wrapping means a document cannot state the same fact twice in both spellings; documents using a single spelling (i.e. all existing ones) are unaffected.ExchangableToEnumerationneeds a one-line update on regeneration. Element additions are purely additive.Not in scope
Verification (xmllint)
NeTEx_publication.xsdcompiles.ENTUR-SchoolTwiceADayTripCarnet_2020120.xml,Netex_91.1_Rail_RailCard_MultipleProduct.xml,rail/Netex_era_distance_ro.xml.Netex_era_distance_ro.xmlwith allExchangable*elements renamed toExchangeable*also validates (forward test).